package thread.BQ;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReadWriteLock;


public class ArrayBlockingQueueTest {
	
	public static void main(String[] args) {
		
		Lock l;
		ReadWriteLock r;
		
		String s; 
		System.out.println("Start of LinkedBlockingQueue >> ");
		BlockingQueue<String> q3   = new ArrayBlockingQueue<String>(1024);
		try {
			q3.put("1");
			q3.put("3");
			q3.put("5");
			q3.put("2");
			q3.put("5");
			System.out.println( q3.take());
			System.out.println( q3.take());
			System.out.println( q3.take());
			System.out.println( q3.take());
			System.out.println( q3.take());
			
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		System.out.println("End of LinkedBlockingQueue >> ");
	}

}
                                                                                                                                           